import request from '@/utils/request'

// 查询会员类型列表
export function listManagement(query) {
  return request({
    url: '/memberTypeManagement/management/memberTypeManagementList',
    method: 'get',
    params: query
  })
}
//修改会员卡的状态
export function updateManagementState(data) {
  return request({
    url: '/memberTypeManagement/management/editState',
    method: 'put',
    data: data
  })
}

// 查询会员类型详细
export function getManagement(id) {
  return request({
    url: '/memberTypeManagement/management/' + id,
    method: 'get'
  })
}

// 新增会员类型
export function addManagement(data) {
  return request({
    url: '/memberTypeManagement/management',
    method: 'post',
    data: data
  })
}

// 修改会员类型
export function updateManagement(data) {
  return request({
    url: '/memberTypeManagement/management',
    method: 'put',
    data: data
  })
}
// 删除会员类型
export function delManagement(id) {
  const data = {
    id,
  }
  return request({
    url: '/memberTypeManagement/management/deleteMemberTypeManagement',
    method: 'delete',
    data: data
  })
}
